﻿using IBLL;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Model;

namespace WebAPI.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class CardController : ControllerBase
    {
        public CardController(ICardBLL bLL)
        {
            BLL = bLL;
        }

        public ICardBLL BLL { get; }
        [HttpPost]
        public Task<int> CAdd(Card c)
        {
            return BLL.CAdd(c);
        }
        [HttpDelete]
        public Task<int> CDel(int Id)
        {
            return BLL.CDel(Id);
        }
        [HttpGet]
        public List<Card> CShow()
        {
            return BLL.CShow();
        }
        [HttpPost]
        public Task<int> CUpd(Card c)
        {
            return BLL.CUpd(c);
        }
        [HttpGet]
        public Card Deng(string Name, string Pass)
        {
            return BLL.Deng(Name, Pass);
        }


    }
}
